package de.planethold.sevenloadj;

import java.util.ArrayList;
import java.util.List;

import org.w3c.dom.Element;
import org.w3c.dom.NodeList;

public class Album {
	private List<Item> items = new ArrayList<Item>();
	
	public Album(Element element) {
		NodeList nodeList = element.getElementsByTagName("item");
		for (int i=0; i<nodeList.getLength(); i++) {
			items.add(new Item((Element)nodeList.item(i)));
		}
	}
	
	public String toString() {
		String response = "";
		for (Item item: items) {
			response += item.toString() + "\n";
		}
		return response;
	}
}
